<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
// API 模板文件，可以复制
namespace api\resource\controller;

use think\Db;
use think\Request;
use think\Validate;
use cmf\controller\RestBaseController;

class Biao20Controller extends RestBaseController
{


    public function one($data)
    {

        //查 这个表的数据
        @$new_data = $data[0]['content'];
        if (empty($new_data)) {
            return '';
        }

        @$radio1_one =  $new_data->radio1 == 1 ?"checked" :"";
        @$radio1_two =  $new_data->radio1 == 2 ?"checked" :"";

        @$radio2_one =  $new_data->radio2 == 1 ?"checked" :"";
        @$radio2_two =  $new_data->radio2 == 2 ?"checked" :"";

       $html = '
            <div style="width: 650px;margin: 0 auto;">
            <div style="font-size: 16px;font-weight: 600;margin-bottom: 15px;">七、项目负责人基本信息</div>
            <table border="1" cellspacing="0px" cellpadding="5px" width="650">
                <tbody>
                <tr>
                    <td>*姓名</td>
                    <td>'.@$new_data->text1.'</td>
                    <td>*性别</td>
                    <td>'.@$new_data->text2.'</td>
                    <td>*所在单位</td>
                    <td>'.@$new_data->text3.'</td>
                </tr>
                <tr>
                    <td colspan="2">*身份证（外籍填写护照）号码</td>
                    <td colspan="4">'.@$new_data->text4.'</td>
                </tr>
                <tr>
                    <td>*是否项目总负责人</td>
                    <td colspan="2">
                        <label>
                            <input type="radio" v-model="radio1" disabled '.@$radio1_one.' value="1">是
                        </label>
                        <label>
                            <input type="radio" v-model="radio1" disabled '.@$radio1_two.' value="0">否
                        </label>
                    </td>
                    <td>*是否院士</td>
                    <td colspan="2">
                        <label>
                            <input type="radio" v-model="radio2" disabled '.@$radio2_one.' value="1">是
                        </label>
                        <label>
                            <input type="radio" v-model="radio2" disabled '.@$radio2_two.' value="0">否
                        </label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">*主要工作经历</td>
                    <td colspan="4">'.@$new_data->text5.'</td>
                </tr>
                <tr>
                    <td colspan="2">*主要工作成绩</td>
                    <td colspan="4">'.@$new_data->text6.'</td>
                </tr>
                </tbody>
            </table>
        </div>
            ';

            return $html;

    }



}
